<template>
    <view>
        <picker mode="multiSelector" :value="dateTimeIndex" :range="dateTimeArray" range-key="name"
            @change="dateTimeChange" @columnchange="bindMultiPickerColumnChange">
            <view class="uni-input">
                <text v-if="timers === ''" style="color:rgba(199, 199, 199, 1);font-size: 26rpx;">选择时间<u-icon
                        color="rgba(199, 199, 199, 1)" size="26" name="arrow-right"></u-icon></text>
                <text v-else style="font-weight: 600;font-size: 26rpx;color:black;">{{ timers }}</text>
            </view>
        </picker>
    </view>
</template>

<script>
import moment from '../../../utils/moment.js'
var itemDate = moment().add('day');
var dateTimeObj = (() => {
    const dateArr = []
    for (let i = 0; i < 7; i++) { // 默认7天
        var itemDate = moment().add(i, 'day');
        var d = itemDate.day();
        let week = '';
        if (d === 0) {
            week = '日'
        }
        if (d === 1) {
            week = '一'
        }
        if (d === 2) {
            week = '二'
        }
        if (d === 3) {
            week = '三'
        }
        if (d === 4) {
            week = '四'
        }
        if (d === 5) {
            week = '五'
        }
        if (d === 6) {
            week = '六'
        }
        dateArr.push({
            name: `${itemDate.format('YYYY年MM月DD日')}(周${week})`,
            value: itemDate.format('YYYY-MM-DD')
        })
    }

    let timeHHArr = [];
    let currentTime = new Date().getHours();//小时
    let currentDay = new Date().getDate();//天
    itemDate = moment().add('day');
    let today = itemDate._d.getDate(); //获取当前日(1-31)
    // console.log(currentDay, today, currentDay == today)

    if (currentDay == today) {//true
        if (currentTime == 0) {
            timeHHArr.push(
                { name: "00:00-01:00" },
                { name: "01:00-02:00" },
                { name: "02:00-03:00" },
                { name: "03:00-04:00" },
                { name: "04:00-05:00" },
                { name: "05:00-06:00" },
                { name: "06:00-07:00" },
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 1) {

            timeHHArr.push(
                { name: "03:00-04:00" },
                { name: "04:00-05:00" },
                { name: "05:00-06:00" },
                { name: "06:00-07:00" },
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 2) {

            timeHHArr.push(
                { name: "04:00-05:00" },
                { name: "05:00-06:00" },
                { name: "06:00-07:00" },
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 3) {

            timeHHArr.push(
                { name: "05:00-06:00" },
                { name: "06:00-07:00" },
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 4) {

            timeHHArr.push(
                { name: "06:00-07:00" },
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 5) {

            timeHHArr.push(
                { name: "07:00-08:00" },
                { name: "08:00-09:00" },
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 6) {

            timeHHArr.push(
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 7) {

            timeHHArr.push(
                { name: "09:00-10:00" },
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 8) {

            timeHHArr.push(
                { name: "10:00-11:00" },
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 9) {

            timeHHArr.push(
                { name: "11:00-12:00" },
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 10) {

            timeHHArr.push(
                { name: "12:00-13:00" },
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 11) {

            timeHHArr.push(
                { name: "13:00-14:00" },
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 12) {

            timeHHArr.push(
                { name: "14:00-15:00" },
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 13) {

            timeHHArr.push(
                { name: "15:00-16:00" },
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 14) {

            timeHHArr.push(
                { name: "16:00-17:00" },
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 15) {
            timeHHArr.push(
                { name: "17:00-18:00" },
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 16) {
            timeHHArr.push(
                { name: "18:00-19:00" },
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 17) {
            timeHHArr.push(
                { name: "19:00-20:00" },
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 18) {
            timeHHArr.push(
                { name: "20:00-21:00" },
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 19) {
            timeHHArr.push(
                { name: "21:00-22:00" },
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 20) {

            timeHHArr.push(
                { name: "22:00-23:00" },
                { name: "23:00-24:00" },
            )
        } else if (currentTime == 21) {
            timeHHArr.push(
                { name: "23:00-24:00" },
            )
        } else {
            timeHHArr.push(
                { name: "预约次日" },

            )
        }
    } else {

        timeHHArr.push(
            { name: "00:00-01:00" },
            { name: "01:00-02:00" },
            { name: "02:00-03:00" },
            { name: "03:00-04:00" },
            { name: "04:00-05:00" },
            { name: "05:00-06:00" },
            { name: "06:00-07:00" },
            { name: "07:00-08:00" },
            { name: "08:00-09:00" },
            { name: "09:00-10:00" },
            { name: "10:00-11:00" },
            { name: "11:00-12:00" },
            { name: "12:00-13:00" },
            { name: "13:00-14:00" },
            { name: "14:00-15:00" },
            { name: "15:00-16:00" },
            { name: "16:00-17:00" },
            { name: "17:00-18:00" },
            { name: "18:00-19:00" },
            { name: "19:00-20:00" },
            { name: "20:00-21:00" },
            { name: "21:00-22:00" },
            { name: "22:00-23:00" },
            { name: "23:00-24:00" },
        )
    }


    return {
        dateArr,
        timeHHArr,
        currentTime: '',//时
    }
})()


export default {
    components: {},
    props: {
        travelDate: {
            type: String,
            default: ''
        },
        dateTimeIndex: {
            type: Array,
            default: function () {
                return [0, 0]
            }
        }
    },
    data() {
        return {
            moment: moment,
            timers: '',
            dateTimeArray: [
                dateTimeObj.dateArr,
                dateTimeObj.timeHHArr
            ],
            //二维数组，长度是多少是几列
            // dateTimeIndex: [0, 0],
        }
    },
    onShow() {
        console.log(this, 'this')
    },
    methods: {
        bindMultiPickerColumnChange(e) {
            if (e.detail.column === 0) {
                if (e.detail.value != 0) {
                    dateTimeObj.timeHHArr.length = 0
                    dateTimeObj.timeHHArr.push(
                        { name: "00:00-01:00" },
                        { name: "01:00-02:00" },
                        { name: "02:00-03:00" },
                        { name: "03:00-04:00" },
                        { name: "04:00-05:00" },
                        { name: "05:00-06:00" },
                        { name: "06:00-07:00" },
                        { name: "07:00-08:00" },
                        { name: "08:00-09:00" },
                        { name: "09:00-10:00" },
                        { name: "10:00-11:00" },
                        { name: "11:00-12:00" },
                        { name: "12:00-13:00" },
                        { name: "13:00-14:00" },
                        { name: "14:00-15:00" },
                        { name: "15:00-16:00" },
                        { name: "16:00-17:00" },
                        { name: "17:00-18:00" },
                        { name: "18:00-19:00" },
                        { name: "19:00-20:00" },
                        { name: "20:00-21:00" },
                        { name: "21:00-22:00" },
                        { name: "22:00-23:00" },
                        { name: "23:00-24:00" },
                    )

                } else {

                    dateTimeObj.timeHHArr.length = 0
                    let currentTime = new Date().getHours();//小时
                    let currentDay = new Date().getDate();//天
                    itemDate = moment().add('day');
                    let today = itemDate._d.getDate(); //获取当前日(1-31)
                    console.log(currentDay, today, currentDay == today)
                    if (currentDay == today) {//true
                        if (currentTime == 0) {
                            dateTimeObj.timeHHArr.push(
                                { name: "00:00-01:00" },
                                { name: "01:00-02:00" },
                                { name: "02:00-03:00" },
                                { name: "03:00-04:00" },
                                { name: "04:00-05:00" },
                                { name: "05:00-06:00" },
                                { name: "06:00-07:00" },
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 1) {
                            dateTimeObj.timeHHArr.push(
                                { name: "03:00-04:00" },
                                { name: "04:00-05:00" },
                                { name: "05:00-06:00" },
                                { name: "06:00-07:00" },
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 2) {

                            dateTimeObj.timeHHArr.push(
                                { name: "04:00-05:00" },
                                { name: "05:00-06:00" },
                                { name: "06:00-07:00" },
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 3) {

                            dateTimeObj.timeHHArr.push(
                                { name: "05:00-06:00" },
                                { name: "06:00-07:00" },
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 4) {

                            dateTimeObj.timeHHArr.push(
                                { name: "06:00-07:00" },
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 5) {

                            dateTimeObj.timeHHArr.push(
                                { name: "07:00-08:00" },
                                { name: "08:00-09:00" },
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 6) {

                            dateTimeObj.timeHHArr.push(
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 7) {

                            dateTimeObj.timeHHArr.push(
                                { name: "09:00-10:00" },
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 8) {

                            dateTimeObj.timeHHArr.push(
                                { name: "10:00-11:00" },
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 9) {

                            dateTimeObj.timeHHArr.push(
                                { name: "11:00-12:00" },
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 10) {

                            dateTimeObj.timeHHArr.push(
                                { name: "12:00-13:00" },
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 11) {

                            dateTimeObj.timeHHArr.push(
                                { name: "13:00-14:00" },
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 12) {

                            dateTimeObj.timeHHArr.push(
                                { name: "14:00-15:00" },
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 13) {

                            dateTimeObj.timeHHArr.push(
                                { name: "15:00-16:00" },
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 14) {

                            dateTimeObj.timeHHArr.push(
                                { name: "16:00-17:00" },
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 15) {
                            dateTimeObj.timeHHArr.push(
                                { name: "17:00-18:00" },
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 16) {
                            dateTimeObj.timeHHArr.push(
                                { name: "18:00-19:00" },
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 17) {
                            dateTimeObj.timeHHArr.push(
                                { name: "19:00-20:00" },
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 18) {
                            dateTimeObj.timeHHArr.push(
                                { name: "20:00-21:00" },
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 19) {
                            dateTimeObj.timeHHArr.push(
                                { name: "21:00-22:00" },
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 20) {

                            dateTimeObj.timeHHArr.push(
                                { name: "22:00-23:00" },
                                { name: "23:00-24:00" },
                            )
                        } else if (currentTime == 21) {
                            dateTimeObj.timeHHArr.push(
                                { name: "23:00-24:00" },
                            )
                        } else {
                            dateTimeObj.timeHHArr.push(
                                { name: "预约次日" },

                            )
                        }
                    } else {

                        dateTimeObj.timeHHArr.push(
                            { name: "00:00-01:00" },
                            { name: "01:00-02:00" },
                            { name: "02:00-03:00" },
                            { name: "03:00-04:00" },
                            { name: "04:00-05:00" },
                            { name: "05:00-06:00" },
                            { name: "06:00-07:00" },
                            { name: "07:00-08:00" },
                            { name: "08:00-09:00" },
                            { name: "09:00-10:00" },
                            { name: "10:00-11:00" },
                            { name: "11:00-12:00" },
                            { name: "12:00-13:00" },
                            { name: "13:00-14:00" },
                            { name: "14:00-15:00" },
                            { name: "15:00-16:00" },
                            { name: "16:00-17:00" },
                            { name: "17:00-18:00" },
                            { name: "18:00-19:00" },
                            { name: "19:00-20:00" },
                            { name: "20:00-21:00" },
                            { name: "21:00-22:00" },
                            { name: "22:00-23:00" },
                            { name: "23:00-24:00" },
                        )
                    }
                }
            }

        },
        dateTimeChange(e) {
            const d = dateTimeObj.dateArr[e.detail.value[0]].value
            const h = dateTimeObj.timeHHArr[e.detail.value[1]].name
            // console.log(d, h)
            this.timers = d + ' ' + h
            // this.$emit("timeSelect", `${d} ${h}`, e.detail.value);
            this.$emit('updateTime', this.timers)
        },
        //获取当前时间
        // Fun_date() {
        //     let date = new Date();
        //     this.currentTime = date.getHours();//小时
        // },
    }
}
</script>

<style lang="scss" scoped>
.my-picker {
    background-color: red;
}
</style>
